package cn.wolfcode.controller;

import cn.wolfcode.util.HttpClientDemo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class HttpClientController {
    @Autowired
    private HttpClientDemo demo;
    @RequestMapping("getContent")
    @ResponseBody
    public String getContent(String url){
        String content = demo.getContent(url);
        return content;
    }
}
